<?php

namespace app\api\controller\user;

use app\api\controller\Controllers;
use think\Request;
use think\Response;

class Info extends Controllers
{

    /**
     * 编辑语种
     * @author zx
     * @date 2020-01-08
     * @return \think\Response
     */
    public function language( int $language, Request $request ): Response
    {
        $uid = $request->userInfo['id'];
        if ( app('user_number_service')->language( $language, $uid ) ) {
            return success();
        }
        return failed('编辑失败');
    }

}
